<?php 
/**
 * 浏览记录
 * 
 */
require_once(dirname(__FILE__)."/config.php");
require_once(DEDEINC."/datalistcp.class.php");
CheckRank(0,0);
$menutype = 'lishi';
setcookie("ENV_GOBACK_URL",GetCurUrl(),time()+3600,"/");
if(!isset($dopost)) $dopost = '';

/**
 *  获取状态
 *
 * @param     string  $sta  状态ID
 * @return    string
 */

if($dopost=='')
{
    if($channel==''){
	   $tiaojian=" WHERE hs.mid='".$cfg_ml->M_ID."'";
	}else{
	   $tiaojian=" WHERE hs.mid='".$cfg_ml->M_ID."' and arc.channel='$channel' ";
	}

	
    $sql = "SELECT hs.*,arc.channel,arc.litpic FROM `#@__jilu` as hs
	        left join `#@__archives` arc on arc.id=hs.aid
	        $tiaojian ORDER BY aid DESC";
    $dlist = new DataListCP();
    $dlist->pageSize = 20;
    $dlist->SetTemplate(DEDEMEMBER."/templets/my_history.htm");    
    $dlist->SetSource($sql);
    $dlist->Display(); 
}